<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>javascript 阶段</title>
</head>
<body>


    <script>
        function App(a,b,c){
            this.distance=a;
            this.user1={name:"小明",speed:b}
            this.user2={name:"小红",speed:c}
        }
        App.prototype.walk = function(){
            console.log(this.distance/(this.user1.speed+this.user2.speed)+"分钟");
        }
        var a1 = new App(3000,40,60);
        var time = a1.walk()

    </script>
</body>
</html>